package cn.foolishbird.crow.spring.security.annotation;

import org.springframework.security.core.annotation.CurrentSecurityContext;

import java.lang.annotation.*;

/**
 * <p>
 *  spring-security controller入参获取用户信息
 *  对登陆用户是否存在不做校验，如果当前存在登陆用户，则获取用户信
 * </p>
 *
 * @author foolishbird
 * @date 2022/01/07
 */
@Documented
@Target(value = ElementType.PARAMETER)
@Retention(value = RetentionPolicy.RUNTIME)
@CurrentSecurityContext(expression = "authentication.details", errorOnInvalidType = false)
public @interface IfHasUserDetails {
}
